﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Multitouch.Framework.WPF;
using Multitouch.Framework.WPF.Input;
using System.ComponentModel;

namespace Project_CFT2
{
    /// <summary>
    /// Interaction logic for InteractiveFurnitureView.xaml
    /// </summary>
    public partial class WelcomePopupView : UserControl
    {
        public WelcomePopupView()
        {

           // SetBinding(MyDataContextProperty, new Binding());


            InitializeComponent();
        }

        //private static void ElementEnterHandler(object sender, ContactEventArgs e)
        //{
        //    var element = sender as IInputElement;
        //    var furnitureElement = sender as InteractiveFurnitureView;

        //    var touchPanel = furnitureElement.Parent as Multitouch.Framework.WPF.Controls.TouchablePanel;


        //public static readonly DependencyProperty MyDataContextProperty =
        //DependencyProperty.Register("MyDataContext",
        //                            typeof(Object),
        //                            typeof(FurniturePopupView),
        //                            new PropertyMetadata(DataContextChanged));

        //private static void DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        //{
        //    FurniturePopupView myControl = (FurniturePopupView)sender;
        //    INotifyPropertyChanged person = e.NewValue as INotifyPropertyChanged;
        //    if (person != null)
        //        person.PropertyChanged += myControl.person_PropertyChanged;
        //}



        //void MyControl_Loaded(object sender, RoutedEventArgs e)
        //{
        //    INotifyPropertyChanged person = DataContext as INotifyPropertyChanged;
        //    if (person != null)
        //        person.PropertyChanged += new PropertyChangedEventHandler(person_PropertyChanged);
        //}

        //void person_PropertyChanged(object sender, PropertyChangedEventArgs e)
        //{
        //    txt_box2.Text = e.PropertyName;
        //    txt_box.Text = e.PropertyName;
            
        //}



        ////    foreach (var item in touchPanel.Children)
        ////    {
        ////        var f = item as InteractiveFurnitureView;
        ////        f.HideButtons();
                
        ////    }
        ////    furnitureElement.ShowButtons();

        ////}



        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            Popup1.Visibility = Visibility.Hidden;

        }

        private void btn_Close_Click(object sender, RoutedEventArgs e)
        {
            Popup1.Visibility = Visibility.Hidden;
        }
        public void ShowPopup()
        {
            Popup1.Visibility = Visibility.Visible;
        }
      

    }
}
